package model;

import java.sql.Timestamp;

/*
* Blog 对象就是对应到 blog 表中的一条记录
*  表里有那些列, 这个类里面就应该有哪些属性
*/
public class Blog {

    private  int blogId;
    private String title;
    private String content;
    private Timestamp PostTime;
    private int userId;

    public Blog() {
    }

    public Blog(int blogId, String title, String content, Timestamp PostTime, int userId) {
        this.blogId = blogId;
        this.title = title;
        this.content = content;
        this.PostTime = PostTime;
        this.userId = userId;
    }

    /**
     * 获取
     * @return blogId
     */
    public int getBlogId() {
        return blogId;
    }

    /**
     * 设置
     * @param blogId
     */
    public void setBlogId(int blogId) {
        this.blogId = blogId;
    }

    /**
     * 获取
     * @return title
     */
    public String getTitle() {
        return title;
    }

    /**
     * 设置
     * @param title
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * 获取
     * @return content
     */
    public String getContent() {
        return content;
    }

    /**
     * 设置
     * @param content
     */
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * 获取
     * @return PostTime
     */
    public Timestamp getPostTime() {
        return PostTime;
    }

    /**
     * 设置
     * @param PostTime
     */
    public void setPostTime(Timestamp PostTime) {
        this.PostTime = PostTime;
    }

    /**
     * 获取
     * @return userId
     */
    public int getUserId() {
        return userId;
    }

    /**
     * 设置
     * @param userId
     */
    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String toString() {
        return "Blog{blogId = " + blogId + ", title = " + title + ", content = " + content + ", PostTime = " + PostTime + ", userId = " + userId + "}";
    }
}
